package ooday04exercise;

import java.util.Timer;
import java.util.TimerTask;

public class TimerDemo03 {
    public static void main(String[] args) {
        Timer  timer=new Timer();
        long interval=1000;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("该学习了！！！");
            }
        },interval,interval);
    }
}
